﻿
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script src="~/Content/js/jquery-1.8.2.min.js"></script>
<div class="main-login-box">
    <div class="login-main">

        <div id="login-content">
            <div class="login-content-title">
                <h6>欢迎来到AnJun|DsShop</h6>
                <h3 id="two1" onmouseover="setContentTab(&#39;two&#39;,1,2)">卖家登录</h3>
                <h3 id="two2" onmouseover="setContentTab(&#39;two&#39;,2,2)" class="active">买家登录</h3>

            </div>
            <!--卖家登录框-->
            <div class="login-content-box" id="con_two_1">
                <div class="login-content-mid">
                    <ul>
                        <li class="date-group"><input type="text" placeholder="请输入用户名"><i><img src=" ~/Content/images/icon/user.png" alt="" width="25" height="25"></i></li>
                        <li class="date-group"><input type="password" placeholder="请输入密码"><i><img src=" ~/Content/images/icon/psw.png" alt="" width="30" height="30"></i></li>
                        <li class="date-group"><input type="text" class="code" placeholder="请输入验证码"><span style="float: right;"><img src=" ~/Content/images/timg.jpg" height="43" width="90" alt=""></span><i><img src=" ~/Content/images/icon/code.png" alt="" width="30" height="30"></i></li>
                    </ul>

                </div>
                <div class="login-content-bottom">
                    <span><a href="">注册卖家帐号</a></span>
                    <span><a href="">|</a></span>
                    <span><a href="">忘记密码?</a></span>
                </div>
                <div class="login-bottom-btn">
                    <button type="submit">登录</button>
                </div>
            </div>
            <!--卖家登录框-->
            <!--买家登录框-->
            <div id="con_two_2">
                <div class="login-content-mid">
                    <ul>
                        <li class="date-group"><input type="text" id="CustName" placeholder="请输入用户名"><i><img src=" ~/Content/images/icon/user.png" alt="" width="25" height="25"></i></li>
                        <li class="date-group"><input type="password" id="Pwd" placeholder="请输入密码"><i><img src=" ~/Content/images/icon/psw.png" alt="" width="30" height="30"></i></li>
                    </ul>

                </div>
               
                <div class="login-bottom-btn">
                    <button type="button" id="btn">登录</button>
                </div>
            </div>
            <!--买家登录框end-->



        </div>

    </div>

</div>


<script>
    $("#btn").click(function () {
        $.post("/Login/DengLu", {
            CustName: $("#CustName").val(),
            Pwd: $("#Pwd").val()
        }, function (res) {
                if (res.Success) {
                    alert(res.Message)
                    window.location.href="/Home/Index"
                } else {
                    alert(res.Message)
                }
        })

    })


</script>

